using System;
using System.Collections.Generic;
using System.Text;

namespace Microsoft.ConnectionEngine.Administration.Core.ServiceProvider.Exception
{
    [Serializable]
    public class ServiceProviderRegisterAdminErrorMessage
    {
        private HSDAdminEntities entity;

        public HSDAdminEntities Entity
        {
            get { return entity; }
            set { entity = value; }
        }

        private HSDAdminOperations operation;

        public HSDAdminOperations Operation
        {
            get { return operation; }
            set { operation = value; }
        }

        private string errorMessage;

        public string ErrorMessage
        {
            get { return errorMessage; }
            set { errorMessage = value; }
        }

        public ServiceProviderRegisterAdminErrorMessage()
        {
            Initialize(HSDAdminEntities.None, HSDAdminOperations.None, "");
        }

        public ServiceProviderRegisterAdminErrorMessage(ServiceProviderRegisterAdminException ex)
        {
            Initialize(ex.Entity, ex.Operation, ex.Message);
        }

        public ServiceProviderRegisterAdminErrorMessage(ServiceProviderRegisterAdminException ex, string msg)
        {
            Initialize(ex.Entity, ex.Operation, msg);
        }

        private void Initialize(HSDAdminEntities hsdentity, HSDAdminOperations hsdoperation, string hsderrormessage)
        {
            Entity = hsdentity;
            Operation = hsdoperation;
            ErrorMessage = hsderrormessage;
        }
    }
}
